<template>
    <!-- 时间显示组件 -->
    {{ nowTime }}
</template>


<script setup lang="ts">
import { formateDate } from '../../../utils/util';
import { ref, onMounted } from 'vue'
const nowTime = ref("")
onMounted(() => {
    //实时显示，就是加一个定时器
    setInterval(() => {
        nowTime.value = formateDate(new Date())
    })
});
</script>


<style scoped></style>


